package com.pcbly.web.business.mail;

import java.util.List;

import com.pcbly.web.bean.mail.UserMailBean;
import com.pcbly.web.business.BaseServiceImp;
import com.pcbly.web.persistence.mail.UserMailDao;

public class UserMailServiceImp extends BaseServiceImp<UserMailBean> implements
		UserMailService {
	
	private UserMailDao userMailDao;
	
	public void setUserMailDao(UserMailDao userMailDao) {
		this.userMailDao = userMailDao;
	}
	public UserMailServiceImp() {
		super();
	}
	@Override
	public UserMailBean getUserMailBeanById(String id) throws Exception {
		// TODO Auto-generated method stub
		return userMailDao.get(id);
	}

	@Override
	public List<UserMailBean> getUserMailBeans() throws Exception {
		// TODO Auto-generated method stub
		return userMailDao.getUserMailBeans();
	}
	@Override
	public void addUserMailBean(UserMailBean userMailBean) throws Exception {
		// TODO Auto-generated method stub
		userMailDao.addUserMailBean(userMailBean);
	}
	@Override
	public void deleteUserMailBean(UserMailBean userMailBean) throws Exception {
		// TODO Auto-generated method stub
		userMailDao.remove(userMailBean);
	}
	@Override
	public void deleteUserMailBeanById(String id) throws Exception {
		// TODO Auto-generated method stub
		userMailDao.removeById(id);
	}
	@Override
	public void updateUserMailBean(UserMailBean userMailBean) throws Exception {
		// TODO Auto-generated method stub
		userMailDao.saveObject(userMailBean);
	}
	@Override
	public UserMailBean getMainUserMailBeanByFlag(String flag) throws Exception {
		// TODO Auto-generated method stub
		return userMailDao.getMainUserMailBeanByFlag(flag);
	}

	

}
